package de.islanders.gameobject;

import de.islanders.interfaces.Collectable;
import de.islanders.interfaces.Edible;
import de.islanders.interfaces.Harvestable;
import de.islanders.unit.player.Player;
import de.islanders.world.Position;

public class Food extends GameObject implements Edible, Collectable, Harvestable {
	public static int TYPE_VEGETABLE = 0,
					  TYPE_MEAT = 1,
					  TYPE_FRUIT = 2,
					  TYPE_GRAIN = 3,
					  TYPE_FISH = 4,
					  TYPE_LIQUID = 5;
	
	private int hungerReduction;
	private int type;
	private boolean raw;

	public Food(String name, double weight, double scaling, Position position, int hungerReduction, boolean raw){
		super(name, weight, scaling, position);
		this.hungerReduction = hungerReduction;
		this.raw = raw;
	}

	/**
	 * @return the hunger reduction
	 */
	public int getHungerReduction() {
		return hungerReduction;
	}

	/**
	 * @param hungerReduction the hunger reduction to set
	 */
	public void setHungerReduction(int hungerReduction) {
		this.hungerReduction = hungerReduction;
	}

	/**
	 * @return the raw
	 */
	public boolean isRaw() {
		return raw;
	}

	/**
	 * @param raw the raw to set
	 */
	public void setRaw(boolean raw) {
		this.raw = raw;
	}

	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}

	@Override
	public void onUse(Player player) {
		this.eat(player);
	}

	@Override
	public String onExamine() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void onDelete(Player player) {
		player.getInventory().getItems().remove(this);
		
	}

	@Override
	public Object harvest(Player player) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object collect(Player player) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void eat(Player player) {
		// TODO Auto-generated method stub
		
	}

}
